package com.europe.business.europebusiness.ui.activity;

import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;

import com.europe.business.europebusiness.R;
import com.europe.business.europebusiness.ui.activity.base.ActionBarActivity;

public class VipActivity extends ActionBarActivity implements View.OnClickListener {
    private CheckBox pay_ali;
    private CheckBox pay_wec;
    private Button confirm_payment;
    private int flag=0;

    @Override
    protected int setMainContent() {
        return R.layout.activity_vip;
    }

    @Override
    protected void initView() {
        super.initView();
        setTitle("成为VIP");
        setToolbarNavigationIcon(R.drawable.actionbar_back);
        setActionRight(false, "", null);
        confirm_payment=findViewById(R.id.confirm_payment);
        pay_ali=findViewById(R.id.pay_ali);
        pay_wec=findViewById(R.id.pay_wec);

        confirm_payment.setOnClickListener(this);
        pay_ali.setOnClickListener(this);
        pay_wec.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.pay_ali:
                if (pay_ali.isChecked()){
                    pay_wec.setChecked(false);
                    flag=0;
                }
                break;
            case R.id.pay_wec:
                if (pay_wec.isChecked()){
                    pay_ali.setChecked(false);
                    flag=1;
                }
                break;
            case R.id.confirm_payment:
                showToastLong("确认支付");
                break;

        }
    }
}
